package facade;

/**
 * @author : DuJiabao
 * @Date : 2021/3/3 19:36
 * @Project : design-pattern
 * @File : null.java
 * @Desc :
 */
public class HomeTheaterFacade {
  private DVDPlayer dVDPlayer;
  private TheaterLight theaterLight;

  public HomeTheaterFacade() {
    dVDPlayer = DVDPlayer.getInstance();
    theaterLight = TheaterLight.getInstance();
  }

  public void on() {
    theaterLight.off();
    dVDPlayer.on();
  }

  public void off() {
    theaterLight.on();
    dVDPlayer.off();
  }
}
